package com.xuan.yrmanage.web.controller_api;


import com.xuan.yrmanage.common.response.ResponseResult;
import com.xuan.yrmanage.domain.Permission;
import com.xuan.yrmanage.domain.request.QueryBean;
import com.xuan.yrmanage.domain.request.QueryPageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Api(value = "权限管理接口",description = "提供权限管理接口的增删改查方法")
public interface PermissionControllerApi {

    @ApiOperation( value = "分页获取权限列表")
    @ApiImplicitParams( {
            @ApiImplicitParam(name="pageIndex",value = "当前页",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name="pageSize",value = "每页条数",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name="userPermission",value = "权限验证",paramType = "query",dataType = "String",required = false),
            @ApiImplicitParam(name="checkUserId",value = "权限验证的userId",paramType = "query",dataType = "int",required = true,defaultValue = "600001")
    } )
    public ResponseResult findAll(QueryPageBean queryPageBean);


    @ApiOperation( value = "根据ID获取权限数据")
    @ApiImplicitParams( {
            @ApiImplicitParam(name="id",value = "权限的ID",paramType = "query",dataType = "String",required = true),
            @ApiImplicitParam(name="userPermission",value = "权限验证",paramType = "query",dataType = "String",required = false),
            @ApiImplicitParam(name="checkUserId",value = "权限验证的userId",paramType = "query",dataType = "int",required = true,defaultValue = "600001")
    } )
    public ResponseResult findById(String id);


    @ApiOperation( value = "修改权限")
    @ApiImplicitParams( {
            @ApiImplicitParam(name="userPermission",value = "权限验证",paramType = "query",dataType = "String",required = false),
            @ApiImplicitParam(name="checkUserId",value = "权限验证的userId",paramType = "query",dataType = "int",required = true,defaultValue = "600001")
    } )
    public ResponseResult edit(@RequestBody Permission permission);


    @ApiOperation( value = "添加权限")
    @ApiImplicitParams( {
            @ApiImplicitParam(name="userPermission",value = "权限验证",paramType = "query",dataType = "String",required = false),
            @ApiImplicitParam(name="checkUserId",value = "权限验证的userId",paramType = "query",dataType = "int",required = true,defaultValue = "600001")
    } )
    public ResponseResult add(@RequestBody Permission permission);







}
